To get the Hebrew scriptures in perspective many considerations must be made. The first is to know at what time any Bible text was first made so as to understand what political motivation was involved. Most of the Bible is actually second hand in substance i.e. its concepts and gods and 'holy' texts are borrowed from other nearby cultures.
Israel was very small potato as a national entity mainly because the population was confined to the desert hills of Canaan and few in number up until the 7th century BCE. Perhaps only 50,000 for much of the time (forget the nationalistic hyperbole of the Bible) which is about the population of one medium size town in the UK today. Because they were hill people, they had few natural resources except sheep and goat carcasses which they traded down in Egypt and later they produced and traded the more valuable olive oil as well and thereby sustained a larger population.
Such a small nation would have been utterly dependent on their mighty neighbours and most especially as you have said Crazy Guy the Egyptians, but also the influences of Babylonian and Persian cultures were significant.On their western border they lived cheek by jowl with the Phoenicians who travelled the Mediterranean and beyond, trading all types of commodities and who probably introduced them to their ox-headed idol Jehovah the son of El, as well as the practice of child sacrifice.
A final but not least consideration is the fact that 'sacred' texts, like any other hand written communication could be destroyed, contrived, have inconvenient facts erased and false evidence inserted...and most certainly this was the case. When politics demanded the worship of a particular deity or just one god above all other gods, the writings would tell the illiterate masses that this information is from the hand of God . After all if you couldn't read, writing itself would have looked like a divinely coded message.